const express = require('express');
// 导入控制器
const loongController = require('../controllers/loong');
// 创建Router实例
const router = express.Router();

// 新增
router.put( '/add' , loongController.validate, loongController.save );

// 查询
router.get( '/list' , loongController.loadAll );

// 删除
router.delete( '/remove/:id' , loongController.delete );

// 查询
router.get( '/find/:id' , loongController.load );

// 修改
router.put( '/update' , loongController.update );

// 导出Router实例
module.exports = router ;